package com.mc.moring.util;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;

public class PoppinsTextView extends androidx.appcompat.widget.AppCompatTextView {
    public PoppinsTextView(Context context) {
        super(context);
        init();
    }

    public PoppinsTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public PoppinsTextView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        if (!isInEditMode()) {
            Typeface poppinsTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/poppins.ttf");
            setTypeface(poppinsTypeface);
        }
    }
}
